package models

/*
type SliceUint8 []uint8

func (this SliceUint8) MarshalJSON() ([]byte, error) {
	panic("不用实现的功能")
}

func (this SliceUint8) UnmarshalJSON(value []byte) error {
	s := string(value)
	sp := strings.Split(s, ",")
	for _, v := range sp {
		if len(v) == 0 {
			continue
		}
		n, err := strconv.ParseUint(v, 10, 8)
		if err != nil {
			panic(err)
		}
		this = append(this, uint8(n))
	}
	return nil
}

type SliceUint16 []uint16

func (this SliceUint16) MarshalJSON() ([]byte, error) {
	panic("不用实现的功能")
}

func (this SliceUint16) UnmarshalJSON(value []byte) error {
	s := string(value)
	sp := strings.Split(s, ",")
	for _, v := range sp {
		if len(v) == 0 {
			continue
		}
		n, err := strconv.ParseUint(v, 10, 16)
		if err != nil {
			panic(err)
		}
		this = append(this, uint16(n))
	}
	return nil
}

type SliceUint32 []uint32

func (this SliceUint32) MarshalJSON() ([]byte, error) {
	panic("不用实现的功能")
}

func (this SliceUint32) UnmarshalJSON(value []byte) error {
	s := string(value)
	sp := strings.Split(s, ",")
	for _, v := range sp {
		if len(v) == 0 {
			continue
		}
		n, err := strconv.ParseUint(v, 10, 32)
		if err != nil {
			panic(err)
		}
		this = append(this, uint32(n))
	}
	return nil
}

type SliceInt32 []int32

func (this SliceInt32) MarshalJSON() ([]byte, error) {
	panic("不用实现的功能")
}

func (this SliceInt32) UnmarshalJSON(value []byte) error {
	s := string(value)
	sp := strings.Split(s, ",")
	for _, v := range sp {
		if len(v) == 0 {
			continue
		}
		n, err := strconv.Atoi(v)
		if err != nil {
			panic(err)
		}
		this = append(this, int32(n))
	}
	return nil
}

type SliceInt64 []int64

func (this SliceInt64) MarshalJSON() ([]byte, error) {
	panic("不用实现的功能")
}

func (this SliceInt64) TextUnmarshaler(value []byte) error {
	s := string(value)
	sp := strings.Split(s, ",")
	for _, v := range sp {
		if len(v) == 0 {
			continue
		}
		n, err := strconv.ParseInt(v, 10, 64)
		if err != nil {
			panic(err)
		}
		this = append(this, n)
	}
	return nil
}

type SliceFloat []float32

func (this SliceFloat) MarshalJSON() ([]byte, error) {
	panic("不用实现的功能")
}

func (this SliceFloat) UnmarshalJSON(value []byte) error {
	s := string(value)
	sp := strings.Split(s, ",")
	for _, v := range sp {
		if len(v) == 0 {
			continue
		}
		n, err := strconv.ParseFloat(v, 32)
		if err != nil {
			panic(err)
		}
		this = append(this, float32(n))
	}
	return nil
}

type MapStringUint16 map[string]uint16

func (this MapStringUint16) MarshalJSON() ([]byte, error) {
	panic("不用实现的功能")
}

func (this MapStringUint16) UnmarshalJSON(value []byte) error {
	if this == nil {
		this = make(map[string]uint16)
	}
	s := string(value)
	sp := strings.Split(s, ",")
	for _, v := range sp {
		if len(v) == 0 {
			continue
		}
		sp2 := strings.Split(v, "=")
		if len(sp) != 2 {
			panic("MapStringFloat 转换出错")
		}
		dec, err := strconv.ParseUint(sp2[0], 10, 16)
		if err != nil {
			panic(err)
		}
		this[sp2[0]] = uint16(dec)
	}
	return nil
}

type MapStringFloat map[string]float32

func (this MapStringFloat) MarshalJSON() ([]byte, error) {
	panic("不用实现的功能")
}

func (this MapStringFloat) UnmarshalJSON(value []byte) error {
	if this == nil {
		this = make(map[string]float32)
	}
	s := string(value)
	sp := strings.Split(s, ",")
	for _, v := range sp {
		if len(v) == 0 {
			continue
		}
		sp2 := strings.Split(v, "=")
		if len(sp) != 2 {
			panic("MapStringFloat 转换出错")
		}
		n, err := strconv.ParseFloat(sp2[1], 32)
		if err != nil {
			panic(err)
		}
		this[sp[0]] = float32(n)
	}
	return nil
}

type MapUint8Uint16 map[uint8]uint16

func (this MapUint8Uint16) MarshalJSON() ([]byte, error) {
	panic("不用实现的功能")
}

func (this MapUint8Uint16) UnmarshalJSON(value []byte) error {
	if this == nil {
		this = make(map[uint8]uint16)
	}
	s := string(value)
	sp := strings.Split(s, ",")
	for _, v := range sp {
		if len(v) == 0 {
			continue
		}
		sp2 := strings.Split(v, "=")
		if len(sp) != 2 {
			panic("MapStringFloat 转换出错")
		}
		src, err := strconv.ParseUint(sp2[0], 10, 8)
		if err != nil {
			panic(err)
		}
		dec, err := strconv.ParseUint(sp2[0], 10, 16)
		if err != nil {
			panic(err)
		}
		this[uint8(src)] = uint16(dec)
	}
	return nil
}

type MapUint8Int32 map[uint8]int32

func (this MapUint8Int32) MarshalJSON() ([]byte, error) {
	panic("不用实现的功能")
}

func (this MapUint8Int32) UnmarshalJSON(value []byte) error {
	if this == nil {
		this = make(map[uint8]int32)
	}
	s := string(value)
	sp := strings.Split(s, ",")
	for _, v := range sp {
		if len(v) == 0 {
			continue
		}
		sp2 := strings.Split(v, "=")
		if len(sp) != 2 {
			panic("MapStringFloat 转换出错")
		}
		src, err := strconv.ParseUint(sp2[0], 10, 8)
		if err != nil {
			panic(err)
		}
		dec, err := strconv.ParseInt(sp2[0], 10, 32)
		if err != nil {
			panic(err)
		}
		this[uint8(src)] = int32(dec)
	}
	return nil
}

type MapIntInt map[int]int

func (this MapIntInt) MarshalJSON() ([]byte, error) {
	panic("不用实现的功能")
}

func (this MapIntInt) UnmarshalJSON(value []byte) error {
	if this == nil {
		this = make(map[int]int)
	}
	s := string(value)
	sp := strings.Split(s, ",")
	for _, v := range sp {
		if len(v) == 0 {
			continue
		}
		sp2 := strings.Split(v, "=")
		if len(sp) != 2 {
			panic("MapStringFloat 转换出错")
		}
		src, err := strconv.Atoi(sp2[0])
		if err != nil {
			panic(err)
		}
		dec, err := strconv.Atoi(sp2[0])
		if err != nil {
			panic(err)
		}
		this[src] = dec
	}
	return nil
}
*/
